﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace algorithms.Algorithms.Utils.ResultSets
{
    public class ROCDataPoint
    {
        public int TruePositives {
            get;
            private set;
        }

        public int FalsePositives {
            get;
            private set;
        }

        public int TrueNegatives {
            get;
            private set;
        }

        public int FalseNegatives {
            get;
            private set;
        }

        public double TruePositiveRate {
            get {
                return (double)TruePositives / (double)(TruePositives + FalseNegatives);
            }
        }

        public double FalsePositiveRate {
            get {
                return (double)FalsePositives / (double)(FalsePositives + TrueNegatives);
            }
        }

        public double TrueNegativeRate {
            get {
                return (double)TrueNegatives / (double)(TrueNegatives + FalsePositives);
            }
        }

        public double FalseNegativeRate {
            get {
                return (double)FalseNegatives / (double)(FalseNegatives + TruePositives);
            }
        }


        public ROCDataPoint(int _truePositives, int _falsePositives, int _trueNegatives, int _falseNegatives) {
            TruePositives = _truePositives;
            TrueNegatives = _trueNegatives;
            FalsePositives = _falsePositives;
            FalseNegatives = _falseNegatives;
        }





    }
}
